#ifndef _EBN_GOAL_H_
#define _EBN_GOAL_H_

#include <vector>
#include "EbnLink.h"

class CEbnCondition;
class CEbnWorldState;

using namespace std;

class CEbnGoal
{
public:
    CEbnGoal(CEbnWorldState * worldState, bool protect = false, bool positive = true);
    ~CEbnGoal(void);

    float getImportance(void);
    void  setImportance(float importance);

    CEbnCondition * getCondition(void);

    CEbnCondition * getRelevanceCondition(void);
    void setRelevanceCondition(CEbnCondition * pCondition);

    void addFromLink(CEbnLink * pLink);
    int getFromLinkCount(void);
    CEbnLink * getFromLink(int index);

    bool isProtected(void);
    void setProtected(bool protect);

    bool isReached(void);

    bool hasWorldState(CEbnWorldState * worldState);

protected:

    bool hasFromLink(CEbnLink * pLink);

private:
    vector<CEbnLink *> mFromLinkList;

    CEbnCondition * mpCondition;
    CEbnCondition * mpRelevanceCondition;
    float mImportance;

    bool mProtected;

};

#endif
